﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:system="clr-namespace:System;assembly=mscorlib"
                    xmlns:globalization="clr-namespace:System.Globalization;assembly=mscorlib"
                    xmlns:dragDrop="clr-namespace:GongSolutions.Wpf.DragDrop;assembly=GongSolutions.Wpf.DragDrop">

  <Style TargetType="{x:Type Page}">
    <Setter Property="FontSize" Value="20" />
  </Style>

  <FontFamily x:Key="DefaultFont">Segoe UI, Lucida Sans Unicode, Verdana</FontFamily>
  <FontFamily x:Key="HeaderFontFamily">Segoe UI Light, Lucida Sans Unicode, Verdana</FontFamily>
  <FontFamily x:Key="ContentFontFamily">Segoe UI, Lucida Sans Unicode, Verdana</FontFamily>

  <system:Double x:Key="HeaderFontSize">40</system:Double>
  <system:Double x:Key="SubHeaderFontSize">29.333</system:Double>
  <system:Double x:Key="WindowTitleFontSize">20</system:Double>
  <system:Double x:Key="NormalFontSize">18</system:Double>
  <system:Double x:Key="ContentFontSize">18</system:Double>
  <system:Double x:Key="FlatButtonFontSize">18</system:Double>
  <system:Double x:Key="TabItemFontSize">26.67</system:Double>
  <system:Double x:Key="UpperCaseContentFontSize">14</system:Double>

  <system:Double x:Key="MenuFontSize">18</system:Double>
  <system:Double x:Key="ContextMenuFontSize">18</system:Double>

  <Style x:Key="MetroHeader">
    <Setter Property="Control.FontFamily" Value="Segoe Black" />
    <Setter Property="Control.FontSize" Value="32pt" />
  </Style>

  <Style x:Key="MetroSubHeader">
    <Setter Property="Control.FontFamily" Value="Segoe Black" />
    <Setter Property="Control.FontSize" Value="24pt" />
  </Style>

  <Style x:Key="MetroLabelStyle">
    <Setter Property="Control.FontFamily" Value="Segoe Black" />
    <Setter Property="Control.FontSize" Value="18pt" />
  </Style>

  <Style x:Key="MetroSubHeaderBold" BasedOn="{StaticResource MetroSubHeader}">
    <Setter Property="Control.FontWeight" Value="Bold" />
  </Style>

  <Style x:Key="MetroColumnHeaderPrintStyle" TargetType="DataGridColumnHeader" BasedOn="{StaticResource ColumnHeaderPrintStyle}">
    <Setter Property="FontFamily" Value="Segoe Black" />
    <Setter Property="FontSize" Value="24pt" />
  </Style>

  <Style x:Key="MetroCellPrintStyle" TargetType="DataGridCell" BasedOn="{StaticResource CellPrintStyle}">
    <Setter Property="FontFamily" Value="Segoe Black" />
    <Setter Property="FontSize" Value="18pt" />
  </Style>

  <Style TargetType="{x:Type DataGrid}" x:Key="MetroDatagridPrintStyle" BasedOn="{StaticResource DatagridPrintStyle}">
    <Setter Property="ColumnHeaderStyle" Value="{StaticResource MetroColumnHeaderPrintStyle}"/>
    <Setter Property="CellStyle" Value="{StaticResource MetroCellPrintStyle}"/>
  </Style>

  <!--TagesplanStyles-->
  <Style x:Key="TagesplanRowHeaderBorder">
    <Setter Property="Border.Padding" Value="5,5,0,0"/>
    <!--<Setter Property="Border.Background" Value="LightGray"/>
    <Setter Property="Border.BorderBrush" Value="Gray"/>
    <Setter Property="Border.BorderThickness" Value="1, 0, 0, 2"/>-->
  </Style>

  <Style x:Key="WochenplanRowHeaderBorder">
    <Setter Property="Border.Padding" Value="5,5,0,0"/>
    <!--<Setter Property="Border.Background" Value="LightGray"/>
    <Setter Property="Border.BorderBrush" Value="Gray"/>
    <Setter Property="Border.BorderThickness" Value="1, 0, 0, 2"/>-->
  </Style>

  <Style x:Key="WochenplanHeaderBorder">
    <Setter Property="Border.Padding" Value="0"/>
    <Setter Property="Border.Background" Value="LightGreen"/>
    <!--<Setter Property="Border.BorderBrush" Value="Gray"/>
    <Setter Property="Border.BorderThickness" Value="1, 0, 0, 2"/>-->
  </Style>

  <LinearGradientBrush x:Key="ItemsBackgroundBrush" StartPoint="0,0.2" EndPoint="1,0.8">
    <GradientStop Offset="0" Color="#FFD1E7F6" />
    <GradientStop Offset="0.7" Color="#FFF1F6FB" />
    <GradientStop Offset="1" Color="#FFD1E7F6" />
  </LinearGradientBrush>

  <Color x:Key="ToggleButtonBackColor" A="160" R="209" G="231" B="246"/>
  <Color x:Key="MouseOverColor" A="255" R="211" G="211" B="211"/>
  <Color x:Key="DisabledColor" A="255" R="169" G="169" B="169"/>
  <Color x:Key="SelectionColor" A="160" R="70" G="130" B="180"/>
  <Color x:Key="NeutralColor" A="0" R="255" G="255" B="255"/>


  <SolidColorBrush x:Key="CheckBoxFillNormal" Color="#F4F4F4"/>
  <SolidColorBrush x:Key="CheckBoxStroke" Color="#8E8F8F"/>
  <Style x:Key="MetroCheckBoxStyle" TargetType="{x:Type CheckBox}">
    <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
    <Setter Property="Background" Value="{StaticResource CheckBoxFillNormal}"/>
    <Setter Property="BorderBrush" Value="{StaticResource CheckBoxStroke}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type CheckBox}">
          <BulletDecorator Background="Transparent" SnapsToDevicePixels="true">
            <BulletDecorator.Bullet>
              <Grid x:Name="ParentGrid">
                <Grid.Background>
                  <SolidColorBrush Color="{StaticResource NeutralColor}"/>
                </Grid.Background>
                <Border x:Name="CheckMark" Margin="2" Height="{TemplateBinding Height}" MinWidth="{TemplateBinding MinWidth}">
                  <Border.Background>
                    <SolidColorBrush Color="{StaticResource ToggleButtonBackColor}"/>
                  </Border.Background>
                  <ContentPresenter Margin="{TemplateBinding Padding}"
                                          VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                          HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                          RecognizesAccessKey="True"
                                          SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                </Border>
              </Grid>
            </BulletDecorator.Bullet>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CheckStates">
                <VisualState x:Name="Checked">
                  <Storyboard>
                    <ColorAnimation  Duration="0:0:0.10" Storyboard.TargetName="CheckMark" Storyboard.TargetProperty="Background.Color" To="{StaticResource ToggleButtonBackColor}"/>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Unchecked">
                  <Storyboard>
                    <ColorAnimation Duration="0:0:0.10" Storyboard.TargetName="CheckMark" Storyboard.TargetProperty="Background.Color" To="{StaticResource NeutralColor}"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
          </BulletDecorator>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="false">
              <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <Style TargetType="{x:Type RadioButton}" x:Key="MetroToggleRadioButton">
    <Setter Property="SnapsToDevicePixels" Value="true" />
    <Setter Property="OverridesDefaultStyle" Value="true" />
    <Setter Property="Margin" Value="5"/>
    <Setter Property="Height" Value="120"/>
    <Setter Property="MinWidth" Value="150"/>
    <Setter Property="FontSize" Value="20"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type RadioButton}">
          <BulletDecorator Background="Transparent">
            <BulletDecorator.Bullet>
              <Grid x:Name="ParentGrid">
                <Grid.Background>
                  <SolidColorBrush Color="{StaticResource NeutralColor}"/>
                </Grid.Background>
                <Border x:Name="CheckMark" Margin="2" Height="{TemplateBinding Height}" MinWidth="{TemplateBinding MinWidth}">
                  <Border.Background>
                    <SolidColorBrush Color="{StaticResource ToggleButtonBackColor}"/>
                  </Border.Background>
                  <Label VerticalAlignment="Center" HorizontalAlignment="Center">
                    <ContentPresenter Margin="0" ContentTemplate="{TemplateBinding ContentTemplate}"
                            RecognizesAccessKey="True" />
                  </Label>
                </Border>
                <!--<Border x:Name="CheckMarkLayer" Margin="2" Height="{TemplateBinding Height}" MinWidth="{TemplateBinding MinWidth}">
                  <Border.Background>
                    <SolidColorBrush Color="{StaticResource NeutralColor}"/>
                  </Border.Background>
                </Border>-->
              </Grid>
            </BulletDecorator.Bullet>
            <!--[TemplateVisualStateAttribute(Name = "InvalidFocused", GroupName = "ValidationStates")]
[TemplateVisualStateAttribute(Name = "Valid", GroupName = "ValidationStates")]
[TemplateVisualStateAttribute(Name = "InvalidUnfocused", GroupName = "ValidationStates")]-->
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Focused">
                  <!--<Storyboard>
                    <ColorAnimation Duration="0:0:0.10" Storyboard.TargetName="CheckMark" Storyboard.TargetProperty="Background.Color" To="{StaticResource SelectionColor}"/>
                  </Storyboard>-->
                </VisualState>
                <VisualState x:Name="Unfocused">
                  <!--<Storyboard>
                    <ColorAnimation Duration="0:0:0.10" Storyboard.TargetName="CheckMark" Storyboard.TargetProperty="Background.Color" To="{StaticResource ToggleButtonBackColor}"/>
                  </Storyboard>-->
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                  <!--<Storyboard>
                    <ColorAnimation Duration="0:0:0.10" Storyboard.TargetName="CheckMark" Storyboard.TargetProperty="Background.Color" To="{StaticResource ToggleButtonBackColor}"/>
                  </Storyboard>-->
                </VisualState>
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ColorAnimation Duration="0:0:0.10" Storyboard.TargetName="ParentGrid" Storyboard.TargetProperty="Background.Color" To="{StaticResource MouseOverColor}"/>
                    <!--<ColorAnimation Duration="0:0:0.10" Storyboard.TargetName="CheckMarkLayer" Storyboard.TargetProperty="Background.Color" To="{StaticResource SelectionColor}"/>-->
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Pressed">
                  <!--<Storyboard>
                    <ColorAnimation Duration="0:0:0.10" Storyboard.TargetName="ParentGrid" Storyboard.TargetProperty="Background.Color" To="{StaticResource MouseOverColor}"/>
                    <ColorAnimation Duration="0:0:0.10" Storyboard.TargetName="CheckMark" Storyboard.TargetProperty="Background.Color" To="{StaticResource SelectionColor}"/>
                  </Storyboard>-->
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <ColorAnimation Duration="0:0:0.10" Storyboard.TargetName="CheckMarkLayer" Storyboard.TargetProperty="Background.Color" To="{StaticResource DisabledColor}"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="CheckStates">
                <VisualState x:Name="Checked">
                  <Storyboard>
                    <ColorAnimation  Duration="0:0:0.10" Storyboard.TargetName="CheckMark" Storyboard.TargetProperty="Background.Color" To="{StaticResource SelectionColor}"/>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Unchecked">
                  <Storyboard>
                    <ColorAnimation Duration="0:0:0.10" Storyboard.TargetName="CheckMark" Storyboard.TargetProperty="Background.Color" To="{StaticResource ToggleButtonBackColor}"/>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
          </BulletDecorator>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <DataTemplate x:Key="PersonDataTemplate">
    <Grid Width="230">
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="Auto"/>
        <ColumnDefinition Width="*"/>
      </Grid.ColumnDefinitions>
      <Grid.RowDefinitions>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="*"/>
      </Grid.RowDefinitions>
      <Image Grid.Column="0" Grid.Row="0" Grid.RowSpan="2" Source="{Binding PersonBild}" HorizontalAlignment="Left" Stretch="Uniform" Margin="0,0,0,5"/>
      <TextBlock Grid.Column="1" Grid.Row="0" Text="{Binding PersonVorname}" Margin="5,0,0,0" VerticalAlignment="Top" TextWrapping="WrapWithOverflow" FontSize="16"/>
      <TextBlock Grid.Column="1" Grid.Row="1" Text="{Binding PersonNachname}" Margin="5,0,0,0" VerticalAlignment="Top" TextWrapping="WrapWithOverflow" FontSize="16"/>
    </Grid>
  </DataTemplate>

  <DataTemplate x:Key="MetroRaumplanDataTemplate">
    <StackPanel Margin="5">
      <TextBlock Style="{StaticResource MetroLabelStyle}" Text="{Binding Path=RaumplanBezeichnung}"/>
      <Image Source="{Binding Path=RaumplanImage}" Height="180"/>
    </StackPanel>
  </DataTemplate>

  <DataTemplate x:Key="MetroSitzplanDataTemplate">
    <StackPanel Margin="5">
      <TextBlock Style="{StaticResource MetroLabelStyle}" Text="{Binding Path=SitzplanBezeichnung}"/>
      <Image Source="{Binding Path=SitzplanRaumplan.RaumplanImage}" Height="180"/>
      <TextBlock Style="{StaticResource MetroLabelStyle}" Text="{Binding Path=SitzplanGültigAbString}"/>
    </StackPanel>
  </DataTemplate>

  <Style TargetType="{x:Type RadioButton}" x:Key="MetroPersonToggleRadioButton" BasedOn="{StaticResource MetroToggleRadioButton}">
    <Setter Property="Height" Value="79"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="ContentTemplate" Value="{StaticResource PersonDataTemplate}" />
  </Style>

  <Style TargetType="{x:Type RadioButton}" x:Key="MetroRaumplanToggleRadioButton" BasedOn="{StaticResource MetroToggleRadioButton}">
    <Setter Property="Height" Value="Auto"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="ContentTemplate" Value="{StaticResource MetroRaumplanDataTemplate}" />
  </Style>

  <Style TargetType="{x:Type RadioButton}" x:Key="MetroSitzplanToggleRadioButton" BasedOn="{StaticResource MetroToggleRadioButton}">
    <Setter Property="Height" Value="Auto"/>
    <Setter Property="Margin" Value="0"/>
    <Setter Property="ContentTemplate" Value="{StaticResource MetroSitzplanDataTemplate}" />
  </Style>

  <Style x:Key="MetroNotenBorderStyle" TargetType="{x:Type Border}">
    <Setter Property="Margin" Value="3"/>
    <Setter Property="Padding" Value="2"/>
  </Style>

  <DataTemplate x:Key="MetroMündlicheNotenView">
    <Border Style="{StaticResource MetroNotenBorderStyle}" Background="{StaticResource NotenBrush}">
      <Border.InputBindings>
        <MouseBinding MouseAction="LeftClick" Command="{Binding Path=EditNoteCommand}"/>
      </Border.InputBindings>
      <Grid>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="*"/>
          <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
          <RowDefinition Height="Auto"/>
          <RowDefinition Height="Auto"/>
          <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" FontSize="10" Padding="0" Content="{Binding Path=NoteDatumFormatted}"/>
        <Label Grid.Row="1" Grid.Column="0" HorizontalAlignment="Center" Style="{StaticResource NotenStyle}" Padding="0" Content="{Binding Path=ZensurString}"/>
        <Label Grid.Row="1" Grid.Column="1" VerticalAlignment="Bottom" HorizontalAlignment="Right" Padding="0" FontSize="10" Content="{Binding Path=NoteGewichtung}"/>
        <Label Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" Padding="0" Content="{Binding Path=NoteBezeichnung}" FontSize="10"/>
      </Grid>
    </Border>
  </DataTemplate>
  
  <DataTemplate x:Key="MetroStandNotenView">
    <Border Style="{StaticResource MetroNotenBorderStyle}" Background="{StaticResource StandBrush}">
      <Grid>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="*"/>
          <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
          <RowDefinition Height="Auto"/>
          <RowDefinition Height="Auto"/>
          <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" FontSize="10" Padding="0" Content="{Binding Path=NoteDatumFormatted}"/>
        <Label Grid.Row="1" Grid.Column="0" HorizontalAlignment="Center" Style="{StaticResource NotenStyle}" Padding="0" Content="{Binding Path=ZensurString}"/>
        <Label Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" Padding="0" Content="{Binding Path=NoteBezeichnung}" FontSize="10"/>
      </Grid>
    </Border>
  </DataTemplate>

  <DataTemplate x:Key="MetroSchriftlicheNotenListView">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="*"/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <Label Grid.Column="0" Content="{Binding Path=NoteBezeichnung}" VerticalAlignment="Center"/>
      <Label Grid.Column="1" Content="{Binding Path=ZensurString}" Style="{StaticResource NotenStyle}" VerticalAlignment="Center"/>
    </Grid>
  </DataTemplate>

  <DataTemplate x:Key="MetroTendenztypView">
    <Border Style="{StaticResource MetroNotenBorderStyle}" Background="Transparent">
      <Label FontSize="24" Padding="0" Content="{Binding Path=TendenztypBezeichnung}"/>
    </Border>
  </DataTemplate>

  <DataTemplate x:Key="MetroTendenzenView">
    <Border Style="{StaticResource MetroNotenBorderStyle}" Width="45" Background="Transparent">
      <Label FontSize="24" Padding="0" Content="{Binding Path=TendenzBezeichnung}"/>
    </Border>
  </DataTemplate>

  <Color x:Key="MouseOverBackgroundColor" A="255" R="200" G="200" B="200"></Color>

  <Style x:Key="MetroSelectableListBoxItem" TargetType="{x:Type ListBoxItem}">
    <Setter Property="Background" Value="Transparent"/>
    <!--<Setter Property="HorizontalContentAlignment" Value="{Binding Path=HorizontalContentAlignment,RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
    <Setter Property="VerticalContentAlignment" Value="{Binding Path=VerticalContentAlignment,RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>-->
    <Setter Property="Padding" Value="0,0,0,0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type ListBoxItem}">
          <Border Name="Bd"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Padding="{TemplateBinding Padding}"
                            SnapsToDevicePixels="true">
            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                          VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                          SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal" />
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ColorAnimationUsingKeyFrames Storyboard.TargetName="Bd"
                                                  Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)">
                      <EasingColorKeyFrame KeyTime="0" Value="{StaticResource MouseOverBackgroundColor}" />
                    </ColorAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger Property="IsSelected" Value="true">
              <Setter TargetName="Bd" Property="Background" Value="{StaticResource NotenBrush}"/>
              <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>
            </Trigger>
            <!--<MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsSelected" Value="true"/>
                <Condition Property="Selector.IsSelectionActive" Value="false"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="Bd" Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
              <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
            </MultiTrigger>-->
            <Trigger Property="IsEnabled" Value="false">
              <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <Style x:Key="MetroListBoxItem" TargetType="ListBoxItem">
    <Setter Property="SnapsToDevicePixels" Value="true" />
    <Setter Property="OverridesDefaultStyle" Value="true" />
    <Setter Property="Padding" Value="0"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBoxItem">
          <Border x:Name="Border" SnapsToDevicePixels="true">
            <Border.Background>
              <SolidColorBrush Color="Transparent" />
            </Border.Background>
            <VisualStateManager.VisualStateGroups>
              <!--[TemplateVisualStateAttribute(Name = "Focused", GroupName = "FocusStates")]
                  [TemplateVisualStateAttribute(Name = "Normal", GroupName = "CommonStates")]-->
              <VisualStateGroup x:Name="SelectionStates">
                <!--Clear all selection states-->
                <VisualState x:Name="Unselected" />
                <VisualState x:Name="Selected"/>
                <VisualState x:Name="SelectedUnfocused"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal" />
                <VisualState x:Name="MouseOver">
                  <Storyboard>
                    <ColorAnimationUsingKeyFrames Storyboard.TargetName="Border"
                                                  Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)">
                      <EasingColorKeyFrame KeyTime="0" Value="{StaticResource MouseOverBackgroundColor}" />
                    </ColorAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <ContentPresenter />
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <Style x:Key="MetroSilentListBoxItem" BasedOn="{StaticResource MetroListBoxItem}" TargetType="ListBoxItem">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="ListBoxItem">
          <Border x:Name="Border" SnapsToDevicePixels="true">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="FocusStates">
                <!--Clear all focus states-->
                <VisualState x:Name="Focused"/>
                <VisualState x:Name="Unfocused"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="SelectionStates">
                <!--Clear all selection states-->
                <VisualState x:Name="Unselected" />
                <VisualState x:Name="Selected"/>
                <VisualState x:Name="SelectedUnfocused"/>
              </VisualStateGroup>
              <VisualStateGroup x:Name="CommonStates">
                <!--Clear all common states-->
                <VisualState x:Name="Normal" />
                <VisualState x:Name="MouseOver"/>
                <VisualState x:Name="Disabled"/>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <ContentPresenter />
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>

  </Style>

  <DataTemplate x:Key="MetroHausaufgabenView">
    <Border Style="{StaticResource MetroNotenBorderStyle}"  Name="HAButton" Background="{Binding Path=HausaufgabeIstNachgereichtFarbe}">
      <Border.InputBindings>
        <MouseBinding MouseAction="RightClick" Command="{Binding Path=ChangeHausaufgabeNichtGemachtCommand}"/>
        <MouseBinding MouseAction="LeftClick" Command="{Binding Path=EditHausaufgabeCommand}"/>
      </Border.InputBindings>
      <Grid Margin="3">
        <Grid.RowDefinitions>
          <RowDefinition Height="Auto"/>
          <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <Label Grid.Row="0" HorizontalAlignment="Left" Padding="0" FontSize="10" Content="{Binding Path=HausaufgabeDatumString}"/>
        <Label Grid.Row="1" Padding="0" FontSize="10" Content="{Binding Path=HausaufgabeBezeichnung}"/>
      </Grid>
    </Border>
    <DataTemplate.Triggers>
      <DataTrigger Binding="{Binding Path=HausaufgabeIstNachgereicht}">
        <DataTrigger.Value>
          <system:Boolean>True</system:Boolean>
        </DataTrigger.Value>
        <Setter TargetName="HAButton" Property="Background" Value="{StaticResource HausaufgabeNachgereichtBrush}"/>
      </DataTrigger>
      <DataTrigger Binding="{Binding Path=HausaufgabeIstNachgereicht}">
        <DataTrigger.Value>
          <system:Boolean>False</system:Boolean>
        </DataTrigger.Value>
        <Setter TargetName="HAButton" Property="Background" Value="{StaticResource HausaufgabeNichtGemachtBrush}"/>
      </DataTrigger>
    </DataTemplate.Triggers>
  </DataTemplate>

  <DataTemplate x:Key="MetroNotentendenzenView">
    <Border Style="{StaticResource MetroNotenBorderStyle}"  Background="{StaticResource NotentendenzBrush}">
      <Border.InputBindings>
        <MouseBinding MouseAction="LeftClick" Command="{Binding Path=EditNotentendenzCommand}"/>
      </Border.InputBindings>
      <Grid>
        <Grid.RowDefinitions>
          <RowDefinition Height="Auto"/>
          <RowDefinition Height="Auto"/>
          <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="Auto"/>
          <!--<ColumnDefinition Width="Auto"/>-->
        </Grid.ColumnDefinitions>
        <Label Grid.Row="0" Grid.Column="0" Padding="0" FontSize="10" Content="{Binding Path=NotentendenzDatumString}"/>
        <Label Grid.Row="0" Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Bottom" Padding="3,0,0,0"
             FontSize="14" FontFamily="Arial" Content="{Binding Path=NotentendenzTendenz.TendenzBezeichnung}"/>
        <Label Grid.Row="1" Grid.ColumnSpan="2" Grid.Column="0" FontSize="10" Padding="0" Content="{Binding Path=NotentendenzTendenztyp.TendenztypBezeichnung}"/>
        <Label Grid.Row="2" Grid.ColumnSpan="2" Grid.Column="0" FontSize="10" Padding="0" Content="{Binding Path=NotentendenzBezeichnung}"/>
      </Grid>
    </Border>
  </DataTemplate>

  <DataTemplate x:Key="MetroNotentypView">
    <Border Style="{StaticResource MetroNotenBorderStyle}" Background="{StaticResource NotentypBrush}">
      <Label FontSize="20" Padding="0" Content="{Binding}"/>
    </Border>
  </DataTemplate>

  <DataTemplate x:Key="MetroZensurtypView">
    <Border Style="{StaticResource MetroNotenBorderStyle}" Width="31" Background="Transparent">
      <Label FontSize="24" Padding="0" Content="{Binding Path=ZensurNoteMitTendenz}"/>
    </Border>
  </DataTemplate>

  <DataTemplate x:Key="MetroKlassenlisteHausaufgabenView">
    <Button Style="{StaticResource HausaufgabeButton}" Name="HAButton" Command="{Binding Path=AddHausaufgabeCommand}">
      <Grid>
        <Grid.ColumnDefinitions>
          <ColumnDefinition/>
          <ColumnDefinition/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
          <RowDefinition/>
          <RowDefinition/>
        </Grid.RowDefinitions>
        <Label Style="{StaticResource MetroLabelStyle}" Grid.Row="0" Grid.Column="0" Margin="0" Padding="0" Content="{Binding Path=SchülereintragPerson.PersonVorname}"/>
        <Label Style="{StaticResource MetroLabelStyle}" Grid.Row="1" Grid.Column="0" Margin="0" Padding="0" Content="{Binding Path=SchülereintragPerson.PersonNachname}"/>
        <Label Style="{StaticResource MetroLabelStyle}" Grid.Row="1" Grid.Column="1" Margin="0" Padding="5,0,0,0" Content="{Binding Path=NichtGemachteHausaufgabenAnzahl}"/>
      </Grid>
    </Button>
    <DataTemplate.Triggers>
      <DataTrigger Binding="{Binding Path=CurrentHausaufgabe}">
        <DataTrigger.Value>
          <x:Null></x:Null>
        </DataTrigger.Value>
        <Setter TargetName="HAButton" Property="Background" Value="{x:Null}"/>
      </DataTrigger>
      <DataTrigger Binding="{Binding Path=CurrentHausaufgabe.HausaufgabeIstNachgereicht}">
        <DataTrigger.Value>
          <system:Boolean>True</system:Boolean>
        </DataTrigger.Value>
        <Setter TargetName="HAButton" Property="Background" Value="{StaticResource HausaufgabeNachgereichtBrush}"/>
      </DataTrigger>
      <DataTrigger Binding="{Binding Path=CurrentHausaufgabe.HausaufgabeIstNachgereicht}">
        <DataTrigger.Value>
          <system:Boolean>False</system:Boolean>
        </DataTrigger.Value>
        <Setter TargetName="HAButton" Property="Background" Value="{StaticResource HausaufgabeNichtGemachtBrush}"/>
      </DataTrigger>
    </DataTemplate.Triggers>
  </DataTemplate>

  <DataTemplate x:Key="SchülereintragDragAdorner">
    <Border BorderThickness="1" Margin="1" Background="LightGray">
      <Grid>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <Label Style="{StaticResource MetroLabelStyle}" Grid.Column="0" Margin="5" Padding="0" Content="{Binding Path=SchülereintragPerson.PersonVorname}"/>
        <Label Style="{StaticResource MetroLabelStyle}" Grid.Column="1" Margin="5" Padding="0" Content="{Binding Path=SchülereintragPerson.PersonNachname}"/>
      </Grid>
    </Border>
  </DataTemplate>

  <DataTemplate x:Key="SitzplaneintragDragAdorner">
    <Border BorderThickness="1" Margin="1" Background="LightGray">
      <Grid>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
          <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <Label Style="{StaticResource MetroLabelStyle}" Grid.Column="0" Margin="5" Padding="0" Content="{Binding Path=SitzplaneintragSchülereintrag.SchülereintragPerson.PersonVorname}"/>
        <Label Style="{StaticResource MetroLabelStyle}" Grid.Column="1" Margin="5" Padding="0" Content="{Binding Path=SitzplaneintragSchülereintrag.SchülereintragPerson.PersonNachname}"/>
      </Grid>
    </Border>
  </DataTemplate>

  <DataTemplate x:Key="MetroSchülereintragGruppenView">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="Auto"/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <Label Style="{StaticResource MetroLabelStyle}" Grid.Column="0" Margin="5" Padding="0" Content="{Binding Path=SchülereintragPerson.PersonVorname}"/>
      <Label Style="{StaticResource MetroLabelStyle}" Grid.Column="1" Margin="5" Padding="0" Content="{Binding Path=SchülereintragPerson.PersonNachname}"/>
    </Grid>
  </DataTemplate>

  <DataTemplate x:Key="MetroPrintSchülereintragGruppenView">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="Auto"/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <Label FontFamily="Segoe Black" FontSize="18" Grid.Column="0" Margin="5" Padding="0" Content="{Binding Path=SchülereintragPerson.PersonVorname}"/>
      <Label FontFamily="Segoe Black" FontSize="18" Grid.Column="1" Margin="5" Padding="0" Content="{Binding Path=SchülereintragPerson.PersonNachname}"/>
    </Grid>
  </DataTemplate>

  <DataTemplate x:Key="MetroSchülereintragSitzplanView">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="Auto"/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <Label Style="{StaticResource MetroLabelStyle}" Grid.Column="0" Margin="5" Padding="0" Content="{Binding Path=SchülereintragPerson.PersonVorname}"/>
    </Grid>
  </DataTemplate>

  <DataTemplate x:Key="MetroSchülereintragGruppenOverview">
    <Button Style="{StaticResource HausaufgabeButton}" Name="SchülerButton" Command="{Binding Path=MarkAsKrankCommand}">
      <Grid>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <Label Style="{StaticResource MetroLabelStyle}" Grid.Column="0" Margin="5" Padding="0" Content="{Binding Path=SchülereintragPerson.PersonKurzform}"/>
      </Grid>
    </Button>
    <DataTemplate.Triggers>
      <DataTrigger Binding="{Binding Path=IstKrank}">
        <DataTrigger.Value>
          <system:Boolean>True</system:Boolean>
        </DataTrigger.Value>
        <Setter TargetName="SchülerButton" Property="Background" Value="{StaticResource HausaufgabeNachgereichtBrush}"/>
      </DataTrigger>
      <DataTrigger Binding="{Binding Path=IstKrank}">
        <DataTrigger.Value>
          <system:Boolean>False</system:Boolean>
        </DataTrigger.Value>
        <Setter TargetName="SchülerButton" Property="Background" Value="{x:Null}"/>
      </DataTrigger>
    </DataTemplate.Triggers>
  </DataTemplate>

  <Style x:Key="MetroGruppenGroupHeaderStyle" TargetType="{x:Type GroupItem}">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type GroupItem}">
          <Border BorderThickness="1" Margin="3" CornerRadius="10" BorderBrush="{StaticResource MetroHeaderBackground}">
            <HeaderedContentControl>
              <HeaderedContentControl.Header>
                <StackPanel Orientation="Horizontal" Margin="5,3">
                  <Label Style="{StaticResource MetroSubHeaderBold}" Content="Gruppe "/>
                  <Label Style="{StaticResource MetroSubHeaderBold}" Content="{Binding Path=Name}"/>
                </StackPanel>
              </HeaderedContentControl.Header>
              <ItemsPresenter/>
            </HeaderedContentControl>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <Style x:Key="MetroPrintGruppenGroupHeaderStyle" TargetType="{x:Type GroupItem}">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type GroupItem}">
          <Border Margin="3" BorderThickness="1" CornerRadius="10" BorderBrush="Black">
            <HeaderedContentControl>
              <HeaderedContentControl.Header>
                <StackPanel Orientation="Horizontal">
                  <Label FontFamily="Segoe Black" FontSize="18" FontWeight="Bold" Content="Gruppe "/>
                  <Label FontFamily="Segoe Black" FontSize="18" FontWeight="Bold" Content="{Binding Path=Name}"/>
                </StackPanel>
              </HeaderedContentControl.Header>
              <ItemsPresenter/>
            </HeaderedContentControl>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
</ResourceDictionary>